# -*- coding:UTF-8 -*-
"""
@Project : pythonProject
@File    : Python-J05.py
@IDE     : PyCharm
@Author  : WorldWind(1772830365@qq.com)
@Address : China - HeiLongjiang - Herbin
@Date    : 2025/7/7 下午11:34
"""
# b.将列表 [1, 2, 3, 4, 5] 中的偶数替换为字符串 "even"，奇数替换为 "odd"
data = [1,2,3,4,5]
i = 0
for item in data:
    if item % 2 == 0:
        data[i] = 'even'
        i += 1
    elif item % 2 == 1:
        data[i] = 'odd'
        i += 1
print(data)